package com.cragon.controller;

import com.cragon.service.IService1;
import com.cragon.service.IService2;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description:
 * @Author 周海龙
 * @Date 2023年10月24日
 */
@RestController
@RequestMapping("/msg")
public class MsgController {
    @DubboReference
    private IService1 service1;
    @DubboReference
    private IService2 service2;

    @GetMapping("/get1")
    public String get1() {
        return service1.getMessage();
    }

    @GetMapping("/get2")
    public String get2() {
        return service2.getMessage();
    }
}
